<?php


namespace App\Services;

use App\Models\LinkModel;

class LinkService
{
    /**
     * 获取所有友情链接
     * @return array
     */
    public function getAll(): array
    {
        return LinkModel::select(['name', 'url'])
            ->where('status', LinkModel::STATUS_ENABLE)
            ->orderBy('sort')
            ->get()->toArray();
    }
}
